package cn.ytr.crm.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.HashMap;

/**
 * 实体类 数据字典明细
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class SystemDictionaryItem extends BaseDomain{

    //字典明细ID
    private Long id;

    //明细所属的目录的ID
    private Long parentId;

    //明细标题
    private String title;

    //明细的排序，用作显示排序的
    private Integer sequence;

    //用来返回 json 数据的
    public String getJsonString() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("parentId", parentId);
        map.put("title", title);
        map.put("sequence", sequence);
        return JSON.toJSONString(map);
    }

}


























































